package com.ptszyxx.popose.common.enums;

import com.ysg.utils.YStringUtil;

public enum MessageNoticeEnum {
    system("1", "系统消息"),
    platform("2", "平台活动");

    private String type;
    private String label;

    MessageNoticeEnum(String type, String label){
        this.type = type;
        this.label = label;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return label;
    }

    public void setName(String name) {
        this.label = name;
    }

    public static MessageNoticeEnum get(String name){
        MessageNoticeEnum[] values = values();
        for (MessageNoticeEnum item: values) {
            if (YStringUtil.eq(item.getName(), name)){
                return item;
            }
        }
        return null;
    }

}
